package com.ref.demo6;

/**
 * @ClassName LeapYearChecker
 * @Description TODO
 * @Author Kx
 * @Date 2025/3/17 18:50
 * @Version 1.0
 */
public class LeapYearChecker {
    /**
     * @description: 判断一个年份是否是闰年
     * @author: Kx
     * @date: 2025/3/17 18:51
     * @param: [year]
     * @return: boolean
     **/
    public boolean isLeapYear(int year){
        if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
            return true;
        } else {
            return false;
        }
    }
}
